package com.herr.processor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.core.PriorityOrdered;
import org.springframework.stereotype.Component;

/**
 * @author herr05
 */
@Component
public class MyBeanFactoryPostProcessor implements BeanFactoryPostProcessor, PriorityOrdered {
    //BeanFactory初始化后回调
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
        //ProcessorConfig processorConfig = (ProcessorConfig) beanFactory.getBean("ProcessorConfig");
        System.out.println("MyBeanFactoryPostProcessor test");
    }

    @Override
    public int getOrder() {
        return 0;
    }
}
